package com.example.administrator.yuejian23.Activity;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;

import com.example.administrator.yuejian23.MainActivity;
import com.example.administrator.yuejian23.R;

/**
 * Created by Administrator on 2017/11/8.
 */

public class StartActivity extends BaseActivity {
    SharedPreferences sp ;
    String name ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start);
        name=super.getUserId();
        Handler handler=new Handler();
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                if (name==null)
                {
                    Intent intent=new Intent(StartActivity.this,LoginActivity.class);
                    startActivity(intent);
                }
                else{
                    Intent intent=new Intent(StartActivity.this,MainActivity.class);
                    startActivity(intent);
                }

            }
        }, 1000);
    }
}